import { defHttp,jsonHttp } from '@/utils/http/axios';
import {
} from './model/deptModel';
import { BasicListResult, BasicDataResult } from '../model/baseModel';

import { ErrorMessageMode } from '#/axios';

enum Api {
  //Login = '/login',
  list = '/jz/wm/storage/list',
  inStorage = '/jz/wm/storage/inStorage',
  outStorage = '/jz/wm/storage/outStorage',
  storageList = '/jz/wm/storage/storageList',
  storageAllList = '/jz/wm/storage/storageAllList',
  analyseList= '/jz/wm/storage/analyseList',
  deletes= '/jz/wm/storage/deletes',
}

/**
 * @description: user login api
 */
export function listApi(params: any, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<BasicDataResult>(
    {
      url: Api.list,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

export function inStorageApi(params: any, mode: ErrorMessageMode = 'modal') {
  return jsonHttp.post<BasicDataResult>(
    {
      url: Api.inStorage,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}
export function outStorageApi(params: any, mode: ErrorMessageMode = 'modal') {
  return jsonHttp.post<BasicDataResult>(
    {
      url: Api.outStorage,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}


export function storageListApi(params: any, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<BasicDataResult>(
    {
      url: Api.storageList,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

export function storageAllListApi(params: any, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<BasicDataResult>(
    {
      url: Api.storageAllList,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}
export function analyseListApi(params: any, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<BasicDataResult>(
    {
      url: Api.analyseList,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

export function deletesApi(params: any, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<BasicDataResult>(
    {
      url: Api.deletes,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}
